package com.czxy.demo02;

import java.util.Scanner;

public class Test01 {
    /*
    "键盘录入月份，输出对应的季节

 (1)键盘录入一个整数(代表月份,范围1-12)
 (2)输出该月份对应的季节
   3,4,5春季
   6,7,8夏季
   9,10,11秋季
   12,1,2冬季
  (3)演示格式如下:
   请输入一个月份:3
   控制台输出:3月份是春季"
     */
    public static void main(String[] args) {
       //键盘录入月份
        Scanner sc=new Scanner(System.in);
        System.out.println("请输入月份");
        int r=sc.nextInt();
        switch (r){
            case 3:
            case 4:
            case 5:
                System.out.println(r+"月份是春季");
                break;
            case 6:
            case 7:
            case 8:
                System.out.println(r+"月份是夏季");
                break;
            case 9:
            case 10:
            case 11:
                System.out.println(r+"月份是秋季");
            case 12:
            case 1:
            case 2:
                System.out.println(r+"月份是冬季");
                break;
            default:
                System.out.println("请输入正确的月份");
        }
    }
}
